const proxy = require('http-proxy-middleware');

module.exports = function (app) {
  // app.use(proxy('/api', { target: 'http://localhost:5000/' }));
  // app.use(proxy('/*.svg', { target: 'http://localhost:5000/' }));

  //   app.use(proxy(标识符，options))


  // http://www.qinqin.net/index.php?r=class/category&type=1
  app.use(proxy('/index.php', {
    target: 'http://www.qinqin.net',
    changeOrigin: true
  }))
  // http://m.maoyan.com/ajax/movieOnInfoList?token=

  // app.use(proxy('/ajax',{
  //     target:'http://m.maoyan.com',
  //     changeOrigin:true
  // }))
};